<%@ page language="java" import="java.util.*,edu.fzu.costlog.domain.*" pageEncoding="utf-8"%>
<%
	CostLog log = (CostLog)request.getAttribute("log");
	List<CostCategory> categorys = (List<CostCategory>)request.getAttribute("categorys");
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>更新消费记录</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

	<style> 
	  body{
	    padding:10px;
	  }
	</style>
  </head>
  
  <body>
    <h3>更新消费记录</h3>
    <form action="costLogMgr" method="post">
      <input type="hidden" name="act" value="update"/>
      <input type="hidden" name="logid" value="<%=log.getLogId()%>"/>
      <div>
        <span>消费编号:</span>
        <span><%=log.getLogId()%></span>
      </div>
      <div>
        <span>消费说明:</span>
        <input type="text" name="logdesc" value="<%=log.getLogDesc()%>"/>
      </div>
      <div>
        <span>消费类型:</span>
        <select name="costtype">
          <option value="">==请选择==</option>
      	  <%for(CostCategory category : categorys){%>
        	<option><%=category.getCategoryName()%></option>
          <%} %>
        </select>
      </div>
      <div>
        <span>消费金额:</span>
        <input type="text" name="costamount" value="<%=log.getCostAmount()%>"/>
      </div>
      <div>
        <input type="submit" value=" 保 存 "/>
      </div>
    </form>
  </body>
</html>
